<%--
  Created by IntelliJ IDEA.
  User: sunk
  Date: 15-1-22
  Time: 上午10:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>测试</title>
    <style>
        .date {
            color: orangered;
        }
    </style>
    <script src="/static/datepicker/WdatePicker.js"></script>
    <script>
        $(function () {
            var a;
//            2015-04-23,2015-06-24;2015-09-03,2015-09-30
            var disabledDates = ['2015-06-0[5-9]', '2015-06-1[0-9]', '2015-06-2[0-9]', '2015-06-3[0-1]', '2015-07-0[0-1]', '2015-07-02', '2015-07-03', '2015-07-04'];
            var disabledDates2 = ['2015-06-0[5-9]', '2015-06-1[0-9]', '2015-06-2[0-9]', '2015-06-3[0-1]', '2015-07-0[0-1]'];
            a = disabledDates2;
            $("#start1").on("click", function () {
                a = disabledDates;
                WdatePicker({el: $dp.$('start1'), isShowOK: false, minDate: '2015-06-01', maxDate: '2015-08-1', disabledDates: a });
            });
            $("#end1").on("focus", function () {
                WdatePicker({el: $dp.$('end1'), isShowOK: false, minDate: '#F{$dp.$D(\'start\',{d:1})}', maxDate: '2015-07-17', disabledDates: disabledDates });
            });

            var date = '';
            $("#addDate").on("click", function () {
                var startTime = $("#start1").val();
                var endTime = $("#end1").val();
                var content = '<span class="date">' + startTime + '至' + endTime + '</span><br/>';
                $("#dateContent").append(content);
                $("#start1").val('');
                $("#end1").val('');
            })
            $("#abtn").click(function () {
                $("#animate:not(:animated)").animate({ top: "+=20" }, 2000);
            })
        });

    </script>

</head>
<body>
<a href="/houseweek/test">正则</a>

<div>
    预定入住日期：
    <input id="start1" class="Wdate" type="text"/>至<input id="end1" class="Wdate" type="text"/>
    &nbsp;<input type="button" class="btn btn-info" id="addDate" vlaue="确定">

    <div id="dateContent">

    </div>
</div>
<input type="button" value="animate" id="abtn"/>

<div id="animate" style="border: 1px solid red;width:300px;height:100px;">

</div>


</body>
</html>